package com.xuecheng.search.search;

import com.xuecheng.framework.domain.search.TeachplanMediaSearch;
import org.springframework.data.elasticsearch.repository.ElasticsearchRepository;
import org.springframework.stereotype.Repository;

import java.util.Collection;
import java.util.List;


/**
 * 课程计划节点,视频URL, 都被存在ES了
 */
@Repository
public interface TeachplanMediaSearchRepository extends ElasticsearchRepository<TeachplanMediaSearch,String> {
    /**
     * 根据多个节点id查询数据
     * @param collection 节点集合
     * @return 数据
     */
    List<TeachplanMediaSearch> findByTeachplanidIn(Collection<String> collection);

    /**
     * 根据课程id查询多个节点
     * @param courseId 课程id
     * @return 节点集合
     */
    List<TeachplanMediaSearch> findByCourseid(String courseId);

    void deleteAll();
}
